#!/bin/bash

data_path=$1
query_path=$2

./src/split_queries $query_path query1.in query2.in query3.in query4.in

person_cnt=$((`cat $data_path/person.csv | wc -l` - 1))

./src/process $data_path/ $person_cnt query1.in query1.out query2.in query2.out query3.in query3.out query4.in query4.out

./src/merge_answers query1.out query2.out query3.out query4.out

rm query1.in query2.in query3.in query4.in
rm query1.out query2.out query3.out query4.out
